export const state = () => ({
  list: [],
  token: ''
})

export const mutations = {
  add(state, data) {
    state.list = data || []
  },
  addToken(state, token) {
    console.log('token:', token)
    state.token = token
  },
  clear(state) {
    state.list = []
  }
}

export const actions = {
  async nuxtServerInit({ commit }, { req, app }) {
    // console.log('serve-side searchParams:' + JSON.stringify(app.searchParams))
    // const { articleSearchList: { list } } = await search(app.searchParams)
    // commit('add', list)
  }
}